﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Commonlib;
namespace AlbonWeb.Manager.StyleManager
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bindStyle();
            }
        }
        //绑定Top Style
        protected void bindStyle()
        {
            string cmdstr = "select * from StyleView where parentID=0 order by sequence";
            SqlHelper.BindRepeater(repMain, SqlHelper.SqlConnectionString, CommandType.Text, cmdstr, null);
        }

        //删除样式
        protected void imgDelete_Click(object sender, ImageClickEventArgs e)
        {
            BLL.StyleBLL stylebll = new BLL.StyleBLL();
            ImageButton imgDelete = (ImageButton)sender;
            stylebll.DeleteStyle(imgDelete.CommandArgument);
            bindStyle();
        }
    }
}